-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small refactor and bump github.com/samber/lo #3473
Conversation
@bryanhuhta Nice work! I wonder if this will have any performance impact? |
@@ -29,7 +29,7 @@ func NewFlameGraph(t *Tree, maxNodes int64) *querierv1.FlameGraph { | |||
|
|||
minVal := t.minValue(maxNodes) | |||
|
|||
stack := stackNodePool.Get().(*Stack[stackNode]) | |||
stack := getNodeStackPool().Get().(*Stack[stackNode]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont get it. Does this create a fresh pool and fresh stack every time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark ReportFinished |
@pyrobench BenchmarkFlamegraph |
Benchmark ReportFinished github.com/grafana/pyroscope/pkg/model.BenchmarkFlamegraph(cpu (sec/op)=9.27 %, alloc_space (B/op)=21.45 %, alloc_objects (allocs/op)=14.54 %)
|
No description provided.